﻿using System;
using System.Collections.Generic;
using System.Text;
using BCMS.Business.DataContract;

namespace BCMS.DAL.IDAL
{
    public interface IUser
    {
        void BeginADOTransaction();
        void RollBackTransaction();
        void CommitADOTransaction();
        void Open(string connString);
        void Close();

        List<UserInfo> getUsers(int page, int offset);
        List<UserInfo> getAllUsers();
        int insertUser(string username, string password, string roles, string fullname, string email, string phone, string address, string position, string department);
        UserInfo getUserByName(string userName);
        UserInfo login(string username, string password);
        UserInfo getUserById(int uID);

        UserInfo getCouponByUserName(string username);
        void deleteUserByUserName(string serial);
        void deleteUserByUserID(string serial);
        void changePassword(int id, string newPassword);
        void updateUserRoles(int uID, string roles);
        void updateUserInfo(int userId, string fullname, string email, string phone, string address, string position, string department);
    }
}
